#include "../bloomfilter.h"
#include <iostream>
#include <cassert>

int main() {
    // 初始化布隆过滤器，设置位数组大小为 2048，哈希函数数量为 10
    BloomFilter bloom(2048, 10);

    // 测试添加元素
    unsigned int element1 = 123;
    unsigned int element2 = 456;
    bloom.add(element1);
    bloom.add(element2);

    // 测试已添加元素的检查
    assert(bloom.check(element1) == true);
    assert(bloom.check(element2) == true);

    // 测试未添加元素的检查
    unsigned int element3 = 789;
    assert(bloom.check(element3) == false);

    std::cout << "All tests passed successfully!" << std::endl;

    return 0;
} 